package com.ruicar.afs.cloud.risk.tortoise.dto.notice;

import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.ruicar.afs.cloud.common.core.enums.AfsEnumDeserializer;
import com.ruicar.afs.cloud.common.core.enums.AfsEnumSerializer;
import com.ruicar.afs.cloud.risk.api.enums.tortoise.GwtTortoiseAntiFraudCallStep;
import com.ruicar.afs.cloud.risk.tortoise.enums.GwtTortoiseCallType;
import com.ruicar.afs.cloud.risk.api.enums.tortoise.GwtTortoiseReturnFlag;
import com.ruicar.afs.cloud.risk.api.enums.tortoise.GwtTortoiseScene;
import lombok.Data;

/**
 * Description 玄武调用时请求参数
 * Author Peng Jinbo
 * Date 2020/07/21 15:45
 */
@Data
public class GwtTortoiseReq {

    /**
     * Ca main id
     * 订单ID（唯一标识）
     */
    @JSONField(name = "camainId")
    @JsonProperty("camainId")
    private String caMainId;

    /**
     * Sys call log id
     */
    @JSONField(name = "responseKey")
    @JsonProperty("responseKey")
    private String sysCallLogId;

    /**
     * Call step
     * 调用步骤
     */
    @JSONField(name = "callStep",serializeUsing = AfsEnumSerializer.class, deserializeUsing = AfsEnumDeserializer.class)
    @JsonProperty("callStep")
    @JsonSerialize(using = AfsEnumSerializer.class)
    @JsonDeserialize(using = AfsEnumDeserializer.class)
    private GwtTortoiseAntiFraudCallStep callStep;

    /**
     * Scene code
     * 场景号，001：正式进件  002：预授信/预审 070：欺诈信息推送 080：手动调用反欺诈 090：手动调用决策引擎
     */
    @JSONField(name = "sceneCode",serializeUsing = AfsEnumSerializer.class, deserializeUsing = AfsEnumDeserializer.class)
    @JsonProperty("sceneCode")
    @JsonSerialize(using = AfsEnumSerializer.class)
    @JsonDeserialize(using = AfsEnumDeserializer.class)
    private GwtTortoiseScene sceneCode;

    /**
     * Data
     */
    @JSONField(name = "data")
    @JsonProperty("data")
    private JSONObject data;

    /**
     * Return flag
     * 退单标识
     */
    @JSONField(name = "returnflag",serializeUsing = AfsEnumSerializer.class, deserializeUsing = AfsEnumDeserializer.class)
    @JsonProperty("returnflag")
    @JsonSerialize(using = AfsEnumSerializer.class)
    @JsonDeserialize(using = AfsEnumDeserializer.class)
    private GwtTortoiseReturnFlag returnFlag;

    /**
     * Error msg
     */
    @JSONField(name = "errorMsg")
    @JsonProperty("errorMsg")
    private String errorMsg;

    /**
     * Error code
     */
    @JSONField(name = "errorCode")
    @JsonProperty("errorCode")
    private String errorCode;

    /**
     * Operation type
     */
    @JsonSerialize(using = AfsEnumSerializer.class)
    @JsonDeserialize(using = AfsEnumDeserializer.class)
    @JSONField(name = "operationType",serializeUsing = AfsEnumSerializer.class, deserializeUsing = AfsEnumDeserializer.class)
    @JsonProperty("operationType")
    private GwtTortoiseCallType operationType;

}
